<!DOCTYPE html>
<html>
<head>
    <title>学校评价表</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
            </i-col>
            <i-button class="btn btn-primary" @click="query">查询</i-button>
            <div style="display: block;float: right">
                <#if shiro.hasPermission("lanling:schoolevaluate:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
            <#if shiro.hasPermission("lanling:schoolevaluate:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <#if shiro.hasPermission("lanling:schoolevaluate:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
</div>
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <i-form ref="formValidate" :model="schoolEvaluate" :rules="ruleValidate" :label-width="80"
            class="form-horizontal">
        <Form-item label="学校" prop="schoolId">
            <i-select v-model="schoolEvaluate.schoolId"  label-in-value @on-change="schoolChange">
                <i-option v-for="item in schoolList" :value="item.id"
                          :key="item.id">{{item.schoolName}}
                </i-option>
            </i-select>
        </Form-item>
        <!--<Form-item label="用户" prop="studentId">-->
            <!--<i-select v-model="schoolEvaluate.studentId"  label-in-value @on-change="studentChange">-->
                <!--<i-option v-for="item in studentList" :value="item.id"-->
                          <!--:key="item.id">{{item.username}}-->
                <!--</i-option>-->
            <!--</i-select>-->
        <!--</Form-item>-->
        <Form-item label="教学星" prop="teachStar">
            <!--<i-input v-model="schoolEvaluate.teachStar" placeholder="教学星"/>-->
            <Rate allow-half v-model="schoolEvaluate.teachStar" />
        </Form-item>
        <Form-item label="环境星" prop="envStar">
            <!--<i-input v-model="schoolEvaluate.envStar" placeholder="环境星"/>-->
            <Rate allow-half v-model="schoolEvaluate.envStar" />
        </Form-item>
        <Form-item label="收费星" prop="payStar">
            <!--<i-input v-model="schoolEvaluate.payStar" placeholder="收费星"/>-->
            <Rate allow-half v-model="schoolEvaluate.payStar" />
        </Form-item>
        <Form-item label="服务星" prop="serverStar">
            <!--<i-input v-model="schoolEvaluate.serverStar" placeholder="服务星"/>-->
            <Rate allow-half v-model="schoolEvaluate.serverStar" />
        </Form-item>
        <Form-item label="评价内容" prop="contentDesc">
            <textarea v-model="schoolEvaluate.contentDesc" placeholder="评价内容" :rows="4" style ="width:100%;"></textarea>
        </Form-item>


        <Form-item>
            <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
            <i-button type="warning" @click="reload" style="margin-left: 8px"/>
            返回</i-button>
        </Form-item>
    </i-form>
</div>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/lanling/schoolevaluate.js?_${.now?long}"></script>
</body>
</html>